<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /* 
      以下这种异步回调函数嵌套异步回调函数的写法被称作为回调地狱
      回调地狱耦合度过高,不方便维护和阅读
    */
    console.log("请求A数据.....");
    setTimeout(() => {
      console.log("A数据请求成功");
      console.log("请求B数据.....");
      setTimeout(() => {
        console.log("B数据请求成功");
        console.log("请求C数据.....");
        setTimeout(() => {
          console.log("C数据请求成功");
        }, 1500)
      }, 2000)
    }, 3000)
  </script>
</body>

</html>